#include <algorithm>
#include <fstream>
#include <vector>
using namespace std;

int main()
{
    ifstream input("duel.in");
    ofstream output("duel.out");
    int n;
    input >> n;
    vector<int> arr(n);
    for (auto& e : arr) {
        input >> e;
    }

    sort(arr.begin(), arr.end());
    int less_number = 0;
    int equal_number = 0;
    int prev = -1;
    int answer = n;
    for (int i = 0; i < n; ++i) {
        if (arr[i] != prev) {
            less_number += equal_number;
            equal_number = 1;
            prev = arr[i];
        } else {
            ++equal_number;
        }

        if (less_number > 0) {
            --less_number;
            --answer;
        }
    }

    output << answer << '\n';
    return 0;
}